XGenΒΆ
Guerilla Render can render the XGen's procedural geometries. Curves, Archives and Spheres are supported. No support for Cards.
Installation
Linux
Make sure the MAYA_PATH/lib and the MAYA_PATH/plug-ins/xgen/lib are present in the LD_LIBRARY_PATH before running "guerilla".
Windows
Make sure the MAYA_PATH/bin and the MAYA_PATH/plug-ins/xgen/bin have been added to the PATH variable before running "guerilla" or "render".
Export from Maya
You first need to export the XGen geometry using the Maya XGen command
Reference XGen files
You can also create yourself a XGen node with
Using PTex textures
To control the XGen geometry shaders with XGen textures (ptex), simply use the PTex texture files like a standard texture file, using a Texture node.
Using XGen attributes in a shader
All the generated XGen attributes are readable from a shader or a subshader using the primattr node or the primattr SL function.
In an SL box, one can retrieve a XGen attribute like this :
float ri = primattr ("ri_XP", 0);
Here is some exemples of XGen attributes:
- ri_XP : random integer per instance/curve/sphere
- rf_XP : random float per instance/curve/sphere
- length_XP : the primitive length
- width_XP : the primitive width
- etc...
XGen archives
To render XGen archives with Guerilla, you will have to prepare Guerilla archive file (*.rib) for every archive file used in XGen.
- Create a Guerilla project with the archive content (all the objects and the shading).
- For every root node in the scene, set the
Transform > Hierarchy Mode attribute to theInherit mode. - Check the look of the asset.
- Remove the lights from this project if they don't need to be instanciate.
- Export the archive with the
File/Create Archive command.
- In Maya, open the the XGen window.
- Select a description using archives.
- In
Archive Files , select an archive file and clickEdit.. .
Replace the file in the slot 3, 4, 5 by the Guerilla archive file previously exported.- Save the Maya project.
You can also edit the content of the XGen archive files (*.xarc) to make them use the Guerilla archive files.
Troubleshooting
Can't load DSO xgen
If you get this message in the console, make sure the MAYA_PATH/bin and the MAYA_PATH/plug-ins/xgen/bin have been added to the PATH on Windows and to the LD_LIBRARY_PATH on Linux, see the installation chapter.
Nothing is rendered
With no message in the console, make sure you've exported the XGen geometry using the Maya XGen command